#ifndef UTIL_BUFFER_H_
#define UTIL_BUFFER_H_

typedef struct {
	U32 length;
	U32 size;
	U32 writingPointer;
	U32 readingPointer;
	U8 *data;
} Buffer;

extern void util_buffer_init(Buffer *buffer, U32 length, U8 *data);
extern void util_buffer_clear(Buffer *buffer);
extern BOOL util_buffer_insert(Buffer *buffer, U8 *byte, U32 size);
extern BOOL util_buffer_remove(Buffer *buffer, U8 *byte, U32 size);

#endif /*UTIL_BUFFER_H_*/
